package com.ruoyi.web.controller.pssd;

import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.page.TableDataInfo;
import com.ruoyi.pssd.domain.PsdDrug;
import com.ruoyi.pssd.service.PsdDepotService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/pssd/stock")
public class PsdDepotController extends BaseController {
    @Autowired
    private PsdDepotService psdDepotService;

    /**
     * 获取列表
     */
    @PreAuthorize("@ss.hasPermi('pssd:stock:list')")
    @GetMapping("/list")
    public TableDataInfo list(PsdDrug drug) {
        startPage();
        List<PsdDrug> list = psdDepotService.selectList(drug);
        return getDataTable(list);
    }
}
